package com.qfedu.openplateform.manager.service.impl;

import com.qfedu.openplateform.manager.dao.AppInfoMapper;
import com.qfedu.openplateform.manager.entity.AppInfo;
import com.qfedu.openplateform.manager.service.AppInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class AppInfoServiceImpl implements AppInfoService {

    @Autowired
    private AppInfoMapper appInfoMapper;

    @Override
    public List<AppInfo> findAllAppInfo(AppInfo appInfo) {
        return appInfoMapper.findAllAppInfo(appInfo);
    }

    @Override
    public void addAppInfo(AppInfo appInfo) {
        appInfoMapper.addAppInfo(appInfo);
    }

    @Override
    public void updateAppInfo(AppInfo appInfo) {
        appInfoMapper.updateAppInfo(appInfo);
    }

    @Override
    public void deleteAppInfo(Integer[] ids) {
        for (Integer id : ids) {
            appInfoMapper.deleteAppInfo(id);
        }
    }
}
